//
//  APICacheProtocol.h
//  BaoZhangWang
//
//  Created by 叶越悦 on 2017/8/9.
//  Copyright © 2017年 yyy. All rights reserved.
//

#import <Foundation/Foundation.h>

@protocol APIManager;

@protocol APICacheProtocol <NSObject>

/**
 根据manager判断是否有缓存对象

 @param manager manager
 @return 是否
 */
- (BOOL)containsObjectForManager:(id<APIManager>)manager;

/**
 根据manager获取缓存对象

 @param manager manger
 @return 缓存对象
 */
- (id)cacheObjectForManager:(id<APIManager>)manager;

/**
 根据manager删除缓存对象

 @param manager manager
 */
- (void)deleteCacheObjectForManager:(id<APIManager>)manager;

/**
 根据 manager 缓存对象

 @param object 缓存对象
 @param manager manager
 */
- (void)storeObject:(id)object withManager:(id<APIManager>)manager;

/**
 清空所有缓存
 */
- (void)cleanAllCaches;

/**
 异步清空缓存

 @param block 回调
 */
- (void)cleanAllCachesWithBlock:(void (^)(void))block;


@end
